package ge.lowlevel.js.box2d;

 

import ge.lowlevel.box2d.BoxGe;
import ge.lowlevel.box2d.FactoryBox2D;
import ge.lowlevel.box2d.RevolutionJointGe;
import ge.lowlevel.box2d.WorldGe;
import ge.modules.physics.PhysicsAttributes;

public class FactoryBox2DJs extends FactoryBox2D 
{
	
	@Override
	public RevolutionJointGe newRevolutionJoint(@SuppressWarnings("rawtypes") BoxGe box1, @SuppressWarnings("rawtypes") BoxGe box2,
			double x, double y) {
		return new RevolutionJointJs((BoxJs)box1,(BoxJs) box2, x, y);
	}

	@SuppressWarnings("rawtypes")
	@Override
	public RevolutionJointGe newRevolutionJoint(WorldGe world, BoxGe box,
			double x, double y) {
		return new RevolutionJointJs((WorldJs)world,(BoxJs) box, x, y);
	}

	public FactoryBox2DJs()
	{
		super();
	}

	@SuppressWarnings("rawtypes")
	@Override
	public BoxJs newBox(WorldGe world, PhysicsAttributes pAtt, double width, double height, double x, double y) {
		return new BoxJs((WorldJs) world, pAtt, width, height, x, y);
	}

	@Override
	public WorldJs newWorld(double xGravity, double yGravity, double minVertex,
			double maxVertex, boolean doSleep,double scale) 
    {
		
		world = new WorldJs(xGravity, yGravity, minVertex, maxVertex, doSleep,scale);
		return (WorldJs) world;
	}

	
	
	
	
}
